﻿using System;

namespace Sebrae.Academico.InfraEstrutura.Core.Helper
{
    public class ExceptionHandler
    {
        public static void TratarExcecao(Exception pException) 
        {

            switch (pException.GetType().Name)
            {
                case "NullReferenceException" :
                    throw pException;

                case "TransientObjectException" :
                    throw pException;
                    
                case "PropertyValueException" :
                    throw pException;

                case "MappingException":
                    throw pException;

                case "ADOException":
                    throw pException;

                case "ArgumentNullException":
                    throw pException;

                default: throw pException;

            }

        }
    }
}
